package com.shanshan.start.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloController {

    @ResponseBody
    @RequestMapping("/h")
    public String hello() {
        return "Hello World !";
    }
    
    @RequestMapping("/w")
    public String world(ModelMap map) {
        map.addAttribute("host", "http://www.shanshan.com");
        return "world";
    }
}
